#include "StdAfx.h"
#include "JWXXManCodeController.h"
/*
int dest[10][3]={{0,0,0},
{0,27,54,},
{0,26,53},
{0,34,61},
{0,33,60},
{0,32,59},
{0,31,58},
{0,30,57},
{0,29,56},
{0,28,55}};
*/

string JWXXSceneText;
string JWXXDirctoryText;
int JWXXIntTest;


JWXXManCodeController::JWXXManCodeController(void)
{
}
JWXXManCodeController::JWXXManCodeController(string curDate, string birth)
{
	JWXXManCodeController::currDate = curDate;
	JWXXManCodeController::birthDate = birth;
	JWXXManCodeController::curScene = new JWXXScene("main");
	curScene->SceneInit(JWXXManCodeController::birthDate,JWXXManCodeController::currDate);
}
JWXXManCodeController::~JWXXManCodeController(void)
{
}

JWXXScene *JWXXManCodeController::getNextScene(int select)
{
	string nextScene;
	JWXXScene * newScene;
	nextScene= curScene->selector.at(select).jumpto;
	newScene = new JWXXScene(nextScene);
	if(newScene->SceneInit(JWXXManCodeController::birthDate,JWXXManCodeController::currDate))
	{	
		JWXXManCodeController::curScene = newScene;
		return newScene;
	}
	else
	{
		return JWXXManCodeController::curScene;
		delete newScene;
	}
}